<%--
  Created by IntelliJ IDEA.
  User: cx
  Date: 2019/9/6
  Time: 13:48
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>日志列表</title>
    <link type="text/css" rel="stylesheet" href="../layui/css/layui.css">
    <script type="text/javascript" src="../layui/layui.js"></script>
    <script type="text/javascript" src="../js/jquery-1.12.4.js"></script>
    <script type="text/javascript">
        layui.use(["table","form","layer"],function () {
            var table=layui.table;
            var form=layui.form;
            var layer=layui.layer;
            table.render({
                elem:"#myTable",
                title:"日志列表",
                url:"${pageContext.request.contextPath}/log/selectAllByPageLog",
                page:true,
                cols:[[
                    {checkbox:true},
                    {field:"logId",title:"日志编号"},
                    {field:"adminId",title:"管理员id"},
                    {field:"logDate",title:"日志时间"},
                    {field:"logContent",title:"操作内容"},
                    {field:"logType",title:"操作类型"},
                    {field:"logIp",title:"ip地址"},
                    {field:"操作",templet:"#cz"}
                ]]
            })
        })

        function  search1() {
            var logType=$("#logType").val();
            layui.use(["table","form","layer"],function () {
                var table = layui.table;
                table.reload("myTable",{
                    where:{"logType":logType}
                });
            })
        }

    </script>


    <style>
        .layui-table-cell{
            height:36px;
            line-height: 36px;
        }
    </style>
</head>
<body>

<div class="layui-inline" id="search1">
    <label class="layui-form-label">操作类型</label>
    <div class="layui-input-inline" style="width: 200px;">
        <input type="text" class="layui-input" id="logType">
    </div>
    <div class="layui-input-inline" style="width: 100px;">
        <button type="button" class="layui-btn layui-btn-normal" onclick="search1()">
            <i class="layui-icon layui-icon-search"></i> 搜索
        </button>
    </div>
</div>
<table id="myTable"></table>

</body>
</html>
